package com.fwyx.controller;

import com.fwyx.client.ProducerClient;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * <p>
 * </p>
 *
 * @author zhuolin
 * @since 2020/3/24
 */
@RestController
@RequestMapping("/api")
public class TestController {


    @Resource
    private ProducerClient producerClient;

    @GetMapping("/sayHello")
    public String sayHello(String name) {
        return producerClient.sayHello(name);
    }


}
